extends ../layout

block main
	ul.breadcrumb
		li
			i.icon-home
		li
			i.icon-angle-right
		li
			a(href="/") 面板


	div(class="row-fluid sortable")
		div(class="box span12")
			div(class="box-header", data-original-title)
				h2
					i(class="halflings-icon user")
					span.break
					| 退保证金

			div.box-content			
				table(class="table table-striped table-bordered bootstrap-datatable datatable")
					thead
						tr
							th 时间
							th 单号
							th 用户
							th 来源
							th 金额
							th 渠道
							th 账号
							th 状态
					tbody
						- var states = ['初始', '成功', '失败']
						- each withdraw in withdraws
							tr
								td= moment(withdraw.updatedAt).format('LLL')
								td
									a(href="/withdraws/#{withdraw.id)}", target="_blank") #{withdraw.id}
								td
									a(href="/customers/#{withdraw.get('customer_id')}", target="_blank") #{withdraw.get('customer_id')}
								td= withdraw.get('source')
								td= withdraw.get('money')
								td= withdraw.get('channel')
								td= withdraw.get('channel_account')
								td= states[withdraw.get('state')]